<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<div class="container">
    <h1>登录界面</h1>

<form method="post" action="/broad/index.php/Home/Index/goinindex">
    <div class="form-group">
        <label for="exampleInputEmail1">username</label>
        <input type="text" class="form-control" id="exampleInputEmail1" placeholder="username" name="username" onblur="message()">
    </div>
    <p style="font-color:red" hidden>
        该用户名已存在
    </p>
    <div class="form-group">
        <label for="exampleInputPassword1">Password</label>
        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" name="password">
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
    </form>
    <a href="/broad/index.php/Home/Index/index">注册</a>
    </div>
<script type="text/javascript">

    function message()
    {
           alert('test');
        var value=document.getElementById("exampleInputEmail1").value;
        var xmlhttp=new XMLHttpRequest();
        xmlhttp.open("GET","/broad/index.php/Home/Index/username?username="+value,true);
        xmlhttp.send();


    }
</script>
</body>
</html>